ScriptObjectExists
Type
operator
Summary
Tests the existence of a script object.
Syntax
<Object> exists
Description
Use to test the existence or otherwise of a script object, for example after attempting to resolve the object from a string using resolve script object
Parameters
Name | Type | Description |
---|---|---|
Object | An expression that evaluates to a ScriptObject. |
Examples
variable tObject as ScriptObject
resolve script object "card 5 of this stack"
put the result into tObject
if tObject exists then
set property "name" of tObject to "Card5"
else
log "No such card"
end if
Related
statement: ResolveScriptObject